
import UIKit


extension UIBarButtonItem {
    
    func setupItem(normalImage: String) -> UIBarButtonItem
    {
        
        let btn = UIButton()
        
        btn.setBackgroundImage(UIImage(named: normalImage), forState: UIControlState.Normal)
        btn.setBackgroundImage(UIImage(named: normalImage + "_highlighted"), forState: UIControlState.Highlighted)
        btn.sizeToFit()
        
        return UIBarButtonItem(customView: btn)
    }
}